#include <assert.h>
#include <string.h>
#include "../access.h"

#ifdef __cplusplus
extern "C"
#endif
int read_int(unsigned char* address) {
    int i = 0;
    memcpy(&i,address,sizeof(i));
    return i;
}

#ifdef __cplusplus
extern "C"
#endif
void write_int(unsigned char* address,size_t max_lenght,int value) {
    assert(max_lenght>=sizeof(value));
    memcpy(address,&value,sizeof(value));
}
